package com.dms.modules.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_coupon")
@ApiModel("用户优惠券实体")
public class UserCoupon {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("用户优惠券ID")
    private Long id;
    
    @ApiModelProperty("用户ID")
    private Long userId;
    
    @ApiModelProperty("优惠券ID")
    private Long couponId;
    
    @ApiModelProperty("状态：0-未使用 1-已使用 2-已过期")
    private Integer status;
    
    @ApiModelProperty("使用时间")
    private LocalDateTime usedTime;
    
    @ApiModelProperty("使用的订单ID")
    private Long orderId;
    
    @ApiModelProperty("领取时间")
    private LocalDateTime getTime;
    
    @ApiModelProperty("过期时间")
    private LocalDateTime expireTime;
    
    @TableField(exist = false)
    @ApiModelProperty("优惠券详情")
    private Coupon coupon;
} 